﻿using System;

namespace Thread
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Thread World!");

            var t1 = new System.Threading.Thread(Func1);
            var t2 = new System.Threading.Thread(Func2);
            t1.Start();
            t2.Start();
            t1.Join();
            t2.Join();

        }

        static void Func1()
        {
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine($"Func1 is Running {i} ......");
                System.Threading.Thread.Sleep(500);
            }
        }

        static void Func2()
        {
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine($"Func2 is Running {i} ......");
                System.Threading.Thread.Sleep(333);
            }
        }
    }
}
